#include "tcpServer.hpp"
#include <memory>

void Usage(const char* string)
{
    cout << "\n\rUsage: " << string << " port(1024+)\n\n";  
}

int main(int argc, char* argv[])
{
    if(argc != 2) {
        Usage(argv[0]);
        return -1;
    } else {
        uint16_t port = stoi(argv[1]);
        unique_ptr<TcpServer> tp(new TcpServer(port));
        tp->initServer();
        tp->run();
    }
    return 0;
}